function weiXin(){
	var weiXin=document.getElementsByClassName("head")[1];
	var erWei=document.getElementById("erWei");
	erWei.style.display="none";
	var flag=0;
	weiXin.onclick=function(){
		if(flag==0){
			erWei.style.display="block";
			flag=1;
		}else{
			erWei.style.display="none";
			flag=0;
		}
	}
}
function nav2(){
	var str=[["v领T恤","圆领T恤","翻领T恤"],
	        ["纯色衬衫","花色衬衫","韩版衬衫"],
	        ["轻薄羽绒服","羽绒马甲","长款羽绒服","面包羽绒服"],
	        ["运动鞋","休闲鞋","皮鞋","马丁靴"],
	        ["麻质上衣","麻裤"],
	        ["羊绒衫","羊毛衫","棉线衫"],
	        ["牛仔裤","运动裤","休闲裤"],
	        ["床","衣柜","橱柜","洗浴用具"],
	        ["定制西装","定制家具","定制首饰"]];
	for(var i=0;i<9;i++){
		var nav2Box=$("<div class='nav2-box'></div>");
		for(var j=0;j<str[i].length;j++){
			var nav2=$("<a href='smallClass.html' class='nav2'>"+str[i][j]+"</a>");
			nav2.appendTo(nav2Box);
		}
		$(".nav:eq("+(i+1)+")").append(nav2Box);
	}

}
function banner(n){
		$(".banner").css({"display":"none"});
		$(".banner:eq("+n+")").css({"display":"block"});
		$(".btns").css({"background":"#CCC"});
		$(".btns:eq("+n+")").css({"background":"#B91720"});
	}
function btns(m){
	for(var i=0;i<m;i++){
		var btns=$("<div class='btns'></div>");
		btns.appendTo(".btns-box");
	}
	$(".btns-box").css({"width":m*30+"px"});
}
function lunbo(){
	var n=0;
	banner(n);
	var m=$(".banner").length;
	btns(m);
	function left(){
     if(n==0){
   	   n=m-1;
     }else{
   	   n--;
     }
     banner(n);
}
	$(".left-btn").click(function(){
		left();
	})
	function right(){
		if(n==m-1){
			n=0;
		}else{
			n++;
		}
		banner(n);
	}
	$(".right-btn").click(function(){
		right();
	})
	var c=setInterval(function(){right();},1000);
	$(".banner").mouseover(function(){clearInterval(c)});
	$(".banner").mouseout(function(){
		c=setInterval(function(){right();},1000);
	})
	$(".btns").click(function(){
		n=$(this).index(".btns");
		banner(n);
	})
}
function backTop(){
	$("#fix-backTop").click(function(){
		$(window).scrollTop(0);
	})
}
function navTop(){
	$(window).scroll(function(){
		if($(window).scrollTop()>=200){
			$(".nav-box").css({"position":"fixed","top":"0","z-index":"1","background":"#fff","margin":"auto","left":"0","right":"0"});
		}else{
$(".nav-box").css({"position":"relative"});
		}
	})
}
function select(){
	var n=0;
	function selectShow(n){
		$(".select").css({"background":"#EEE","color":"#666"});
		$(".select:eq("+n+")").css({"background":"#B91720","color":"#fff"});
		$("form").css({"display":"none"});
		$("form:eq("+n+")").css({"display":"block"});
	}
	selectShow(n);
	$(".select").click(function(){
		n=$(this).index(".select");
		selectShow(n);
	})
}
function vilaShow(){
	var chars=["0","1","2","3","4","5","6","7","8","9"];
	var str="";
	for(var k=0;k<6;k++){
		var i=Math.floor(Math.random()*10);
		str+=chars[i];
	}
	$("#vilaCodeA").html(str);

}